package com.xc.common;


import com.google.common.collect.Sets;

import java.util.Set;

/**
 * Created by xiongcan on 2017/12/26.
 */
public class Const {
    public static final String CURRENT_USER = "currentUser";

    //  由于普通用户和管理员是一个组，用枚举显得比较繁重，通过内部的接口类区分
    public interface Role{
        int ROLE_CUSTOMER = 0;      //  普通用户
        int ROLE_ADMIN = 1;         //  管理员
    }
    //
    public interface ListOrder{
        Set<String> USER_ASC_DESC = Sets.newHashSet("id_asc","id_desc");

    }
    //redis lock config
    public interface RedisCacheExTime{
        int REDIS_SESSION_EXTIME = 60 *30;
    }
    //  redis 锁的常量
    public interface REDIS_LOCK{
        String CHECK_NEW_STOCK_LOCK = "CHECK_NEW_STOCK_LOCK";
    }

    //  股票类型
    public interface StockType{
        String HUGU = "sh";
        String SHENSHI = "sz";
    }
    //  股票显示状态
    public interface StockShow{
        int show = 0;
        int no_show = 1;
    }
    //  股票锁定状态
    public interface StockLock{
        int no_lock = 0;
        int lock = 1;
    }
    //  短信redis 前缀
    public interface SmsKeyPrefix{
        String ALIYUN_PREFIX = "AliyunSmsCode:";
    }
    //  用户账号类型
    public interface UserAccountType{
        int zhengshi = 0;
        int moni = 1;
    }
    //  用户锁定状态
    public interface UserLoginStatus{
        int zhengchang = 0;
        int lock = 1;
    }
    //  用户锁定状态
    public interface UserLockStatus{
        int zhengchang = 0;
        int lock = 1;
    }
    //  用户激活状态
    public interface UserActiveStatus{
        int reg_active = 0;         //  注册
        int auth_active = 1;        //  提交激活
        int success_active = 2;     //  实名认证成功
        int fail_active = 3;        //  激活打回
    }
    //  代理用户锁定状态
    public interface AgentUserLockStatus{
        int zhengchang = 0;
        int lock = 1;
    }
    //  股票持仓 方向
    public interface StockPositionDirection{
        String buy_rise = "买涨";   //  买涨
        String buy_fall = "买跌";   //  买跌
    }
    //  资金明细类型
    public interface UserCashDetailType{
        String sxf = "手续费";
        String yhs = "印花税";
        String lcf = "留仓费";
        String pcsxf = "平仓手续费";
        String fdyk = "浮动盈亏";
        String usertx = "用户提现";
        String usercz = "用户充值";
        String allprofit = "总盈亏";
    }
    //  资金明细是否已读
    public interface UserCashDetailIsRead{
        int read = 1;
        int no_read = 0;
    }

    //  定时任务类型
    public interface SiteTaskType{
        String closingStay = "扣除留仓费";
        String forceStockSell_profitAndLose_TASK = "定时任务强制平仓-浮动盈亏";
        String forceStockSell_closingDay_TASK = "定时任务强制平仓-浮动盈亏";
        String forceStockSell_SYSTEM = "系统手动平仓";

        String adminUpdateMoney = "管理员修改金额";

    }
    //  定时任务状态
    public interface SiteTaskStatus{
        int success = 0;
        int fail = 1;
    }

    //  用户充值记录表的状态
    public interface UserRechargeStatus{
        int apply_status = 0;           //已下单
        int charge_success = 1;         //入金成功
        int charge_fail = 2;            //入金失败
        int charge_cancel = 3;          //过期取消
    }

    public interface  UserRechargeChannel{
        int alipay_company_trans = 0;   //  支付宝对公转账
        int company_trans_bank = 1;     //  对公转账
    }

    //  用户提现记录表的状态
    public interface UserWithdrawStatus{
        int apply_status = 0;       //已申请
        int trans_success = 1;      //转账成功
        int trans_fail = 2;         //转账失败
        int apply_cancel = 3;       //  用户主动取消订单
    }

    //  用户持仓的状态
    public interface PositionStatus{
        int ccd = 0;    //  持仓中
        int pcd = 1;    //  已平仓
    }

    public interface SiteAdminLockStatus{
        int zhengchang = 0;    //  正常
        int lock = 1;    //  锁定
    }

    public interface SellStockDoType{
        int admin_do_type = 0;
        int normal_do_type = 1;
    }

    public interface AdminAddMoneyDirection{
        int add = 0;
        int substract = 1;
    }

    public interface SiteBannerPlatType{
        String M_TYPE = "m";
        String PC_TYPE = "pc";
    }

    public interface UserPositionLockStatus{
        int lock = 1;
        int unlock = 0;
    }

    public static void main(String[] args) {
//        User user = new User();
//
//        String username = "zhangsan";
//        int age = 14;
//        String x = String.format("name : %s , age : %d", username, age);
//        System.out.printf(x);
    }




}
